import request from '@/utils/request'
const api = {
  // 获取供应商下拉列表数据
  GetSupplierDataList(data, method) {
    return request({
      url: '/api/Warehouse/GetSupplierDataList',
      method: method || 'post',
      data: data
    })
  },
  
  // 获取基础物料下拉列表数据
  GetGoodsDataList(data, method) {
    return request({
      url: '/api/Warehouse/GetGoodsDataList',
      method: method || 'post',
      data: data
    })
  },

  // 获取库存物料下拉列表数据
  GetStockGoodsDataList(data, method) {
    return request({
      url: '/api/Warehouse/GetStockGoodsDataList',
      method: method || 'post',
      data: data
    })
  },

//获得物料入库类型数据列表
  GetGoodsInStockTypeDataList(data, method) {
    return request({
      url: '/api/System/GetGoodsInStockTypeDataList',
      method: method || 'post',
      data: data
    })
  },

  // 分页获取匹配的物料入库报表数据
  PageQueryInStockReportsDataList(data, method) {
    return request({
      url: '/api/Report/PageQueryInStockReportsDataList',
      method: method || 'post',
      data: data
    })
  },

  // 判断是否存在匹配的物料入库报表数据
  IsHaveOutExcelInStockReportsData(data, method) {
    return request({
      url: '/api/Report/IsHaveOutExcelInStockReportsData',
      method: method || 'post',
      data: data
    })
  },

  // 导出匹配的物料入库报表数据到Excel文件
  ExportInStockReportsDataToExcel(data, method) {
    return request({
      url: '/api/Report/ExportInStockReportsDataToExcel',
      method: method || 'post',
      data: data,
       responseType: "blob",
    })
  },

   // 获得订单的统计报表数据
   QueryOrdersStatReportData(data, method) {
    return request({
      url: '/api/Report/QueryOrdersStatReportData',
      method: method || 'post',
      data: data
    })
  },

   // 获得订单的统计报表数据
   PageQueryProduceBackMaterialReportsData(data, method) {
    return request({
      url: '/api/Report/PageQueryProduceBackMaterialReportsData',
      method: method || 'post',
      data: data
    })
  },

   // 导出匹配的物料入库报表数据到Excel文件
   ExportProduceBackMaterialReportsToExcel(data, method) {
    return request({
      url: '/api/Report/ExportProduceBackMaterialReportsToExcel',
      method: method || 'post',
      data: data,
       responseType: "blob",
    })
  },

  // 分页获取生产作业任务报表数据列表
  PageQueryProduceCraftWorkTaskReportsData(data, method) {
    return request({
      url: '/api/Report/PageQueryProduceCraftWorkTaskReportsData',
      method: method || 'post',
      data: data
    })
  },


  // 导出订单的生产退料报表数据到Excel文件
  ExportProduceCraftWorkTaskReportsToExcel(data, method) {
    return request({
      url: '/api/Report/ExportProduceCraftWorkTaskReportsToExcel',
      method: method || 'post',
      data: data,
       responseType: "blob",
    })
  },

  // 设备配置-选择设备列表
  GetMatchProductDevices(data, method) {
    return request({
      url: '/api/ProduceMachine/GetMatchProduceMachineList',
      method: method || 'post',
      data: data
    })
  },

  //获得物料出库类型数据列表
  GetGoodsOutStockTypeDataList(data, method) {
    return request({
      url: '/api/System/GetGoodsOutStockTypeDataList',
      method: method || 'post',
      data: data
    })
  },

  // 分页获取匹配的物料出库报表数据
  PageQueryOutStockReportsDataList(data, method) {
    return request({
      url: '/api/Report/PageQueryOutStockReportsDataList',
      method: method || 'post',
      data: data
    })
  },

   // 导出匹配的物料出库报表数据到Excel文件
   ExportOutStockReportsDataToExcel(data, method) {
    return request({
      url: '/api/Report/ExportOutStockReportsDataToExcel',
      method: method || 'post',
      data: data,
       responseType: "blob",
    })
  },

   // 获得首页统计数据
   GetHomePageStatData(data, method) {
    return request({
      url: '/api/Report/GetHomePageStatData',
      method: method || 'post',
      data: data,
    })
  },

   // 分页获取存在工艺异常的销售订单报表数据列表
   PageQueryHaveCraftExceptionsOrdersReportsData(data, method) {
    return request({
      url: '/api/Report/PageQueryHaveCraftExceptionsOrdersReportsData',
      method: method || 'post',
      data: data,
    })
  },

   //获取业务订单的工艺异常数据列表
   GetProduceWorkExceptionsForOrder(data, method) {
    return request({
      url: '/api/Report/GetProduceWorkExceptionsForOrder',
      method: method || 'post',
      data: data,
    })
  },

   //导出存在工艺异常的销售订单报表数据到Excel文件
   ExportHaveCraftExceptionsOrdersReportsToExcel(data, method) {
    return request({
      url: '/api/Report/ExportHaveCraftExceptionsOrdersReportsToExcel',
      method: method || 'post',
      data: data,
      responseType: "blob",
    })
  },

   //获取所有订单数据
   GetPageValidSaleOrderDataList(data, method) {
    return request({
      url: '/api/Report/GetPageValidSaleOrderDataList',
      method: method || 'post',
      data: data,
    })
  },
   //分页获取匹配的采购明细
   GetMatchPagePurchaseOrderDetails(data, method) {
    return request({
      url: '/api/GoodsPurchaseOrder/GetMatchPagePurchaseOrderDetails',
      method: method || 'post',
      data: data,
    })
  },

   //更新采购明细对账状态
   UpdatePurchaseOrderDetailReconciled(data, method) {
    return request({
      url: '/api/GoodsPurchaseOrder/UpdatePurchaseOrderDetailReconciled',
      method: method || 'post',
      data: data,
    })
  },

   //导出匹配的采购明细excel
   ExportPurchaseOrderDetailsReconcile(data, method) {
    return request({
      url: '/api/GoodsPurchaseOrder/ExportPurchaseOrderDetailsReconcile',
      method: method || 'post',
      responseType: "blob",
      data: data,
    })
  },

  //根据日期范围查询协议书号为主体的生产统计数据
  PageQueryProductionByOrderReport(data, method) {
    return request({
      url: '/api/Report/PageQueryProductionByOrderReport',
      method: method || 'post',
      data: data,
    })
  },

  //报表管理-成品入库明细（根据入库日期范围查询协议书号为主体的成品入库数据）
  PageQueryFinishedProductInStockReport(data, method) {
    return request({
      url: '/api/Report/PageQueryFinishedProductInStockReport',
      method: method || 'post',
      data: data,
    })
  },

  //报表管理-生产排程单（根据交期范围查询生产工艺为主体的生产统计数据）
  PageQueryProductionCraftTaskReport(data, method) {
    return request({
      url: '/api/Report/PageQueryProductionCraftTaskReport',
      method: method || 'post',
      data: data,
    })
  },

  //报表管理-成品出库明细（根据下单日期范围查询协议书号为主体的成品出库数据）
  PageQueryFinishedProductOutStockReport(data, method) {
    return request({
      url: '/api/Report/PageQueryFinishedProductOutStockReport',
      method: method || 'post',
      data: data,
    })
  },
}
export default api
